package com.ybxx.base.service.impl;

import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.ybxx.base.dao.FeesTypeDao;
import com.ybxx.base.model.FeesType;
import com.ybxx.base.service.FeesTypeService;
import com.ybxx.core.command.QueryFilter;
import com.ybxx.core.dao.GenericDao;
import com.ybxx.core.service.impl.BaseServiceImpl;
import com.ybxx.core.web.paging.PagingBean;
import com.ybxx.hr.model.Dept;

public class FeesTypeServiceImpl extends BaseServiceImpl<FeesType> implements
		FeesTypeService {
	
	private FeesTypeDao feesTypeDao;
	public FeesTypeServiceImpl(FeesTypeDao dao) {
		super(dao);
		this.feesTypeDao=dao;
		// TODO Auto-generated constructor stub
	}
	public List<FeesType> queryPage(FeesType feesType,QueryFilter filter) {
		String hql="from FeesType ft";
		String condition=" where ";
		if(feesType!=null && StringUtils.isNotEmpty(feesType.getFtname())){
			hql+=condition+" ft.ftname='"+feesType.getFtname()+"' ";
		}
		return feesTypeDao.findByHql(hql, null,filter.getPagingBean());
	}
}
